package com.yzd.learnjava.iniialization;

public class Overloading {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		for(int i = 0 ; i < 5 ; i++){
			Tree tree = new Tree(i);
			tree.info();
			tree.info("Overload method");
		}
		
		new Tree();
	}
}

class Tree{
	int height ;
	Tree() {
		System.out.println("Plant a seedling");
		height = 0;
	}
	
	Tree(int initialHeight){
		height = initialHeight;
		System.out.println("Create new Tree that is " + height + " feet tall");
	}
	
	void info(){
		System.out.println("Tree is " + height + " feet tall");
	}
	
	void info(String s){
		System.out.println(s + ": Tree is " + height + " feet tall");
	}
}
